﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage
{
    public class QueryBytesMapObjectInfoDto : PageResultDto
    {
        /// <summary>
        /// plc 连接配置
        /// </summary>
        public long? PlcReadDbId { get; set; }
        /// <summary>
        /// 对象名称
        /// </summary>
        public string ObjectName { get; set; }
        public string EquipmentCode { get; set; }

    }

    public class BytesMapObjectInfoDto
    {
        public long ID { get; set; }
        public string Js_Id { get { return ID.ToString(); } }
        /// <summary>
        /// plc 连接配置
        /// </summary>
        public long PlcReadDbId { get; set; }
        /// <summary>
        /// 单个对角的字节索引
        /// </summary>
        public int BytesIndex { get; set; }
        /// <summary>
        /// 单个对象的字节长度
        /// </summary>
        public int BytesLength { get; set; }
        /// <summary>
        /// 单个对象的长度
        /// </summary>
        public int ObjectLength { get; set; }
        /// <summary>
        /// 单个对象的大小
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public int ObjectCount { get; set; }
        /// <summary>
        /// 对象名称
        /// </summary>
        public string ObjectName { get; set; }

        /// <summary>
        /// db编号
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public int DbCode { get; set; }
        /// <summary>
        /// 报文处理模块类型，用于工厂创建报文处理模块对象
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string ProcessModuleType { get; set; }
        /// <summary>
        /// 报文处理模块对象的名称
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string ProcessModuleName { get; set; }
        public string EquipmentCode { get; set; }
        /// <summary>
        /// PLC名称其实由 jobname和plcconnectID确定一个
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcName { get; set; }
    }
}
